package com.xmu.prcs.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

import org.hibernate.annotations.Index;
/**
 * 增加专题的申请表
 * @author frequent
 *
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "application", uniqueConstraints = @UniqueConstraint(columnNames = "subjectname"))
@org.hibernate.annotations.Table(appliesTo = "application",
        indexes = {@Index(name = "idxAT", columnNames = {"applicationtime"})})
public class Application implements Serializable {

	private Integer idApplication;
	private Date applicationTime; //申请时间
	private String subjectName;//主题名
	private Integer status;//状态̬
	private String subjectInfo;//专题介绍
	
	public Application(){
		
	}
	
	public Application(Date applicationTime, String subjectName, String info){
		this.applicationTime = applicationTime;
		this.subjectName = subjectName;
		this.subjectInfo = info;
	}

	@Id
	@GeneratedValue
	@Column(name = "idapplication", unique = true, nullable = true)
	public Integer getIdApplication() {
		return idApplication;
	}

	public void setIdApplication(Integer idApplication) {
		this.idApplication = idApplication;
	}

	@Column(name = "applicationtime")
	public Date getApplicationTime() {
		return applicationTime;
	}

	public void setApplicationTime(Date applicationTime) {
		this.applicationTime = applicationTime;
	}

	@Column(name = "subjectname", length = 20)
	public String getSubjectName() {
		return subjectName;
	}

	public void setSubjectName(String subjectName) {
		this.subjectName = subjectName;
	}

	@Column(name = "status")
	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@Column(name = "subjectinfo", length = 200)
	public String getSubjectInfo() {
		return subjectInfo;
	}

	public void setSubjectInfo(String subjectInfo) {
		this.subjectInfo = subjectInfo;
	}
	
}
